package com.atfzr.lock;

/**
 * @author 望夜
 * @date 2023/8/16---11:46
 * @SuppressWarnings({"all"})
 */
public class LockSyncDemo {

    Object object    = new Object();

    public void m1(){
        synchronized (object){ //执行线程，就要先持有管程
            System.out.println("--- hello synchronized code block");
        }
    }

    public static void main(String[] args) {

    }
}
